home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
nt
/
zkf102.zip
/
proto.bat
< prev
next >
Wrap
DOS Batch File
|
1995-01-04
|
2KB
|
38 lines
@zkbat proto.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
msg "A big hello from proto.bat to you." gsm;
// Try running this file, proto.bat, by typing "proto", just like any
// other batch file, to verify that the output appears on your screen.
//
// Notice that no #include directive is used above. That's because
// the zk library #include files are already compiled for zk, in
// zkpch.dat. You do need to use #include directives for other
// #include files, if any, when you write your own c++ scripts.
//
// The msg and gsm macros are described in library.txt. You could use
// cout instead of msg but then you would have to #include "iosteam.h".
//
// Don't define main() when using zk, because the main code is executed
// directly from the input. Functions other than main are defined the
// normal way, as are classes, etc. Use argc and argv, as shown below,
// to get the command line arguments, if any. If argc and argv are
// confusing, try running proto.bat with some arguments to see if the
// output clears up your confusion. For example try "proto me us all".
//
// The first line in this file, "@zkbat proto.bat", is what causes it
// to get interpreted as a c++ script. You need that in your own c++
// scripts, but change the name proto to whatever your script file is
// named, e.g. "@zkbat myscript.bat". The %1 etc. indicate that it
// can take arguments. Without those, any arguments will be ignored
// and will not be available via argc/argv.
void byefrom(const char *whom) {
msg "Goodbye from %s for now.",whom gsm;
}
for(int i=0; i<argc; i++) {
byefrom(argv[i]);
}